#信号量实现生产者与消费者的简单通信
from threading import Semaphore
produced=Semaphore(0)
consumed=Semaphore(1)

def producer():
    while True:
        consumed.acquire()

